var Q = require("q");
var db = require("./db.js")

//获取报表
//@id 报表编号
exports.getById = function(id) {
    var deferred = Q.defer();
    db.db().get("SELECT * FROM report_model WHERE id = ?", [id], deferred.resolve)
    return deferred.promise;
    //return Q.nfcall(db.db().get, "SELECT * FROM report_mode WHERE id = ?", [id]);
}